package com.lkd.mapper;

import com.lkd.entity.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-08-20
 */
@Mapper
public interface OrderMapper extends BaseMapper<Order> {

    @Select("select sum(amount) from tb_order where create_time between #{start} and #{end}")
    Double getOrderAmount(Date start, Date end);
}
